


<?php
require('init.php');
@$user_name=$_REQUEST['uname'];
if($user_name===null || $user_name===""){
    die("用户名不能为空");
}
@$user_pwd=$_REQUEST['upwd'];
if($user_pwd===null || $user_pwd===""){
    die("密码不能为空");
}
$sql="select * from user where uname='$user_name' and  upwd='$user_pwd'";
$result=mysqli_query($conn,$sql);
if($result){
    $row = mysqli_fetch_assoc($result);
    if($row===NULL){
        echo "用户名或密码错误";
    }else{
        echo "登录成功";
    }
}

